3.1.93 \(\int \frac {(x+x^2)^{3/2}}{1+x^2} \, dx\) [93]

3.1.93.1 Optimal result
3.1.93.2 Mathematica [C] (verified)
3.1.93.3 Rubi [A] (verified)
3.1.93.4 Maple [B] (verified)
3.1.93.5 Fricas [C] (verification not implemented)
3.1.93.6 Sympy [F]
3.1.93.7 Maxima [F]
3.1.93.8 Giac [F(-2)]
3.1.93.9 Mupad [F(-1)]

3.1.93.1 Optimal result

Integrand size = 17, antiderivative size = 130 \[ \int \frac {\left (x+x^2\right )^{3/2}}{1+x^2} \, dx=\frac {1}{4} (5+2 x) \sqrt {x+x^2}+\sqrt {1+\sqrt {2}} \arctan \left (\frac {1+\sqrt {2}-x}{\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+x^2}}\right )-\sqrt {-1+\sqrt {2}} \text {arctanh}\left (\frac {1-\sqrt {2}-x}{\sqrt {2 \left (-1+\sqrt {2}\right )} \sqrt {x+x^2}}\right )-\frac {5}{4} \text {arctanh}\left (\frac {x}{\sqrt {x+x^2}}\right ) \]

output
-5/4*arctanh(x/(x^2+x)^(1/2))+1/4*(5+2*x)*(x^2+x)^(1/2)-arctanh((1-x-2^(1/ 
2))/(x^2+x)^(1/2)/(-2+2*2^(1/2))^(1/2))*(2^(1/2)-1)^(1/2)+arctan((1-x+2^(1 
/2))/(x^2+x)^(1/2)/(2+2*2^(1/2))^(1/2))*(1+2^(1/2))^(1/2)
 
3.1.93.2 Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.

Time = 0.11 (sec) , antiderivative size = 121, normalized size of antiderivative = 0.93 \[ \int \frac {\left (x+x^2\right )^{3/2}}{1+x^2} \, dx=\frac {\sqrt {x} \sqrt {1+x} \left (\sqrt {x} \sqrt {1+x} (5+2 x)+5 \log \left (-\sqrt {x}+\sqrt {1+x}\right )+8 \text {RootSum}\left [16+32 \text {$\#$1}+16 \text {$\#$1}^2+\text {$\#$1}^4\&,\frac {\log \left (-2 x+2 \sqrt {x} \sqrt {1+x}+\text {$\#$1}\right ) \text {$\#$1}^2}{8+8 \text {$\#$1}+\text {$\#$1}^3}\&\right ]\right )}{4 \sqrt {x (1+x)}} \]

input
Integrate[(x + x^2)^(3/2)/(1 + x^2),x]
 
output
(Sqrt[x]*Sqrt[1 + x]*(Sqrt[x]*Sqrt[1 + x]*(5 + 2*x) + 5*Log[-Sqrt[x] + Sqr 
t[1 + x]] + 8*RootSum[16 + 32*#1 + 16*#1^2 + #1^4 & , (Log[-2*x + 2*Sqrt[x 
]*Sqrt[1 + x] + #1]*#1^2)/(8 + 8*#1 + #1^3) & ]))/(4*Sqrt[x*(1 + x)])
 
3.1.93.3 Rubi [A] (verified)

Time = 0.43 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.15, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.647, Rules used = {1309, 27, 2144, 27, 1091, 219, 1369, 25, 1363, 216, 220}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\left (x^2+x\right )^{3/2}}{x^2+1} \, dx\)

\(\Big \downarrow \) 1309

\(\displaystyle \frac {1}{4} (2 x+5) \sqrt {x^2+x}-\frac {1}{2} \int \frac {5 x^2+16 x+5}{4 \left (x^2+1\right ) \sqrt {x^2+x}}dx\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {1}{4} (2 x+5) \sqrt {x^2+x}-\frac {1}{8} \int \frac {5 x^2+16 x+5}{\left (x^2+1\right ) \sqrt {x^2+x}}dx\)

\(\Big \downarrow \) 2144

\(\displaystyle \frac {1}{8} \left (-5 \int \frac {1}{\sqrt {x^2+x}}dx-\int \frac {16 x}{\left (x^2+1\right ) \sqrt {x^2+x}}dx\right )+\frac {1}{4} \sqrt {x^2+x} (2 x+5)\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {1}{8} \left (-5 \int \frac {1}{\sqrt {x^2+x}}dx-16 \int \frac {x}{\left (x^2+1\right ) \sqrt {x^2+x}}dx\right )+\frac {1}{4} \sqrt {x^2+x} (2 x+5)\)

\(\Big \downarrow \) 1091

\(\displaystyle \frac {1}{8} \left (-16 \int \frac {x}{\left (x^2+1\right ) \sqrt {x^2+x}}dx-10 \int \frac {1}{1-\frac {x^2}{x^2+x}}d\frac {x}{\sqrt {x^2+x}}\right )+\frac {1}{4} \sqrt {x^2+x} (2 x+5)\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {1}{8} \left (-16 \int \frac {x}{\left (x^2+1\right ) \sqrt {x^2+x}}dx-10 \text {arctanh}\left (\frac {x}{\sqrt {x^2+x}}\right )\right )+\frac {1}{4} \sqrt {x^2+x} (2 x+5)\)

\(\Big \downarrow \) 1369

\(\displaystyle \frac {1}{8} \left (-16 \left (\frac {\int -\frac {\left (1-\sqrt {2}\right ) x+1}{\left (x^2+1\right ) \sqrt {x^2+x}}dx}{2 \sqrt {2}}-\frac {\int -\frac {\left (1+\sqrt {2}\right ) x+1}{\left (x^2+1\right ) \sqrt {x^2+x}}dx}{2 \sqrt {2}}\right )-10 \text {arctanh}\left (\frac {x}{\sqrt {x^2+x}}\right )\right )+\frac {1}{4} \sqrt {x^2+x} (2 x+5)\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{8} \left (-16 \left (\frac {\int \frac {\left (1+\sqrt {2}\right ) x+1}{\left (x^2+1\right ) \sqrt {x^2+x}}dx}{2 \sqrt {2}}-\frac {\int \frac {\left (1-\sqrt {2}\right ) x+1}{\left (x^2+1\right ) \sqrt {x^2+x}}dx}{2 \sqrt {2}}\right )-10 \text {arctanh}\left (\frac {x}{\sqrt {x^2+x}}\right )\right )+\frac {1}{4} \sqrt {x^2+x} (2 x+5)\)

\(\Big \downarrow \) 1363

\(\displaystyle \frac {1}{8} \left (-16 \left (\frac {\left (1-\sqrt {2}\right ) \int \frac {1}{\frac {\left (-x-\sqrt {2}+1\right )^2}{x^2+x}+2 \left (1-\sqrt {2}\right )}d\frac {-x-\sqrt {2}+1}{\sqrt {x^2+x}}}{\sqrt {2}}-\frac {\left (1+\sqrt {2}\right ) \int \frac {1}{\frac {\left (-x+\sqrt {2}+1\right )^2}{x^2+x}+2 \left (1+\sqrt {2}\right )}d\frac {-x+\sqrt {2}+1}{\sqrt {x^2+x}}}{\sqrt {2}}\right )-10 \text {arctanh}\left (\frac {x}{\sqrt {x^2+x}}\right )\right )+\frac {1}{4} \sqrt {x^2+x} (2 x+5)\)

\(\Big \downarrow \) 216

\(\displaystyle \frac {1}{8} \left (-16 \left (\frac {\left (1-\sqrt {2}\right ) \int \frac {1}{\frac {\left (-x-\sqrt {2}+1\right )^2}{x^2+x}+2 \left (1-\sqrt {2}\right )}d\frac {-x-\sqrt {2}+1}{\sqrt {x^2+x}}}{\sqrt {2}}-\frac {1}{2} \sqrt {1+\sqrt {2}} \arctan \left (\frac {-x+\sqrt {2}+1}{\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x^2+x}}\right )\right )-10 \text {arctanh}\left (\frac {x}{\sqrt {x^2+x}}\right )\right )+\frac {1}{4} \sqrt {x^2+x} (2 x+5)\)

\(\Big \downarrow \) 220

\(\displaystyle \frac {1}{8} \left (-16 \left (-\frac {1}{2} \sqrt {1+\sqrt {2}} \arctan \left (\frac {-x+\sqrt {2}+1}{\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x^2+x}}\right )-\frac {\left (1-\sqrt {2}\right ) \text {arctanh}\left (\frac {-x-\sqrt {2}+1}{\sqrt {2 \left (\sqrt {2}-1\right )} \sqrt {x^2+x}}\right )}{2 \sqrt {\sqrt {2}-1}}\right )-10 \text {arctanh}\left (\frac {x}{\sqrt {x^2+x}}\right )\right )+\frac {1}{4} \sqrt {x^2+x} (2 x+5)\)

input
Int[(x + x^2)^(3/2)/(1 + x^2),x]
 
output
((5 + 2*x)*Sqrt[x + x^2])/4 + (-16*(-1/2*(Sqrt[1 + Sqrt[2]]*ArcTan[(1 + Sq 
rt[2] - x)/(Sqrt[2*(1 + Sqrt[2])]*Sqrt[x + x^2])]) - ((1 - Sqrt[2])*ArcTan 
h[(1 - Sqrt[2] - x)/(Sqrt[2*(-1 + Sqrt[2])]*Sqrt[x + x^2])])/(2*Sqrt[-1 + 
Sqrt[2]])) - 10*ArcTanh[x/Sqrt[x + x^2]])/8
 

3.1.93.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 220
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(- 
1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && 
 (LtQ[a, 0] || GtQ[b, 0])
 

rule 1091
Int[1/Sqrt[(b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Simp[2   Subst[Int[1/(1 
 - c*x^2), x], x, x/Sqrt[b*x + c*x^2]], x] /; FreeQ[{b, c}, x]
 

rule 1309
Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_)*((d_.) + (f_.)*(x_)^2)^(q_), x 
_Symbol] :> Simp[(b*(3*p + 2*q) + 2*c*(p + q)*x)*(a + b*x + c*x^2)^(p - 1)* 
((d + f*x^2)^(q + 1)/(2*f*(p + q)*(2*p + 2*q + 1))), x] - Simp[1/(2*f*(p + 
q)*(2*p + 2*q + 1))   Int[(a + b*x + c*x^2)^(p - 2)*(d + f*x^2)^q*Simp[b^2* 
d*(p - 1)*(2*p + q) - (p + q)*(b^2*d*(1 - p) - 2*a*(c*d - a*f*(2*p + 2*q + 
1))) - (2*b*(c*d - a*f)*(1 - p)*(2*p + q) - 2*(p + q)*b*(2*c*d*(2*p + q) - 
(c*d + a*f)*(2*p + 2*q + 1)))*x + (b^2*f*p*(1 - p) + 2*c*(p + q)*(c*d*(2*p 
- 1) - a*f*(4*p + 2*q - 1)))*x^2, x], x], x] /; FreeQ[{a, b, c, d, f, q}, x 
] && NeQ[b^2 - 4*a*c, 0] && GtQ[p, 1] && NeQ[p + q, 0] && NeQ[2*p + 2*q + 1 
, 0] &&  !IGtQ[p, 0] &&  !IGtQ[q, 0]
 

rule 1363
Int[((g_) + (h_.)*(x_))/(((a_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f 
_.)*(x_)^2]), x_Symbol] :> Simp[-2*a*g*h   Subst[Int[1/Simp[2*a^2*g*h*c + a 
*e*x^2, x], x], x, Simp[a*h - g*c*x, x]/Sqrt[d + e*x + f*x^2]], x] /; FreeQ 
[{a, c, d, e, f, g, h}, x] && EqQ[a*h^2*e + 2*g*h*(c*d - a*f) - g^2*c*e, 0]
 

rule 1369
Int[((g_.) + (h_.)*(x_))/(((a_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + ( 
f_.)*(x_)^2]), x_Symbol] :> With[{q = Rt[(c*d - a*f)^2 + a*c*e^2, 2]}, Simp 
[1/(2*q)   Int[Simp[(-a)*h*e - g*(c*d - a*f - q) + (h*(c*d - a*f + q) - g*c 
*e)*x, x]/((a + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x] - Simp[1/(2*q)   Int[ 
Simp[(-a)*h*e - g*(c*d - a*f + q) + (h*(c*d - a*f - q) - g*c*e)*x, x]/((a + 
 c*x^2)*Sqrt[d + e*x + f*x^2]), x], x]] /; FreeQ[{a, c, d, e, f, g, h}, x] 
&& NeQ[e^2 - 4*d*f, 0] && NegQ[(-a)*c]
 

rule 2144
Int[(Px_)/(((a_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), 
x_Symbol] :> With[{A = Coeff[Px, x, 0], B = Coeff[Px, x, 1], C = Coeff[Px, 
x, 2]}, Simp[C/c   Int[1/Sqrt[d + e*x + f*x^2], x], x] + Simp[1/c   Int[(A* 
c - a*C + B*c*x)/((a + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x]] /; FreeQ[{a, 
c, d, e, f}, x] && PolyQ[Px, x, 2]
 
3.1.93.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(266\) vs. \(2(98)=196\).

Time = 4.60 (sec) , antiderivative size = 267, normalized size of antiderivative = 2.05

method result size
pseudoelliptic \(-\frac {\left (\left (-\frac {\sqrt {2}}{2}+1\right ) \ln \left (\frac {\sqrt {2}\, x -\sqrt {\left (1+x \right ) x}\, \sqrt {2+2 \sqrt {2}}+x +1}{x}\right )+\left (\frac {\sqrt {2}}{2}-1\right ) \ln \left (\frac {\sqrt {2}\, x +\sqrt {\left (1+x \right ) x}\, \sqrt {2+2 \sqrt {2}}+x +1}{x}\right )-\frac {5 \sqrt {-2+2 \sqrt {2}}\, \ln \left (\frac {\sqrt {\left (1+x \right ) x}-x}{x}\right )}{8}+\frac {5 \sqrt {-2+2 \sqrt {2}}\, \ln \left (\frac {x +\sqrt {\left (1+x \right ) x}}{x}\right )}{8}-\frac {\sqrt {-2+2 \sqrt {2}}\, \left (x +\frac {5}{2}\right ) \sqrt {\left (1+x \right ) x}}{2}+\sqrt {2}\, \left (\arctan \left (\frac {\sqrt {2+2 \sqrt {2}}\, x -2 \sqrt {\left (1+x \right ) x}}{x \sqrt {-2+2 \sqrt {2}}}\right )-\arctan \left (\frac {\sqrt {2+2 \sqrt {2}}\, x +2 \sqrt {\left (1+x \right ) x}}{x \sqrt {-2+2 \sqrt {2}}}\right )\right )\right ) x^{2}}{\sqrt {-2+2 \sqrt {2}}\, \left (x +\sqrt {\left (1+x \right ) x}\right )^{2} \left (-\sqrt {\left (1+x \right ) x}+x \right )^{2}}\) \(267\)
trager \(\left (\frac {5}{4}+\frac {x}{2}\right ) \sqrt {x^{2}+x}-\frac {5 \ln \left (1+2 x +2 \sqrt {x^{2}+x}\right )}{8}-\frac {\operatorname {RootOf}\left (\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}+\textit {\_Z}^{2}+16\right ) \ln \left (-\frac {3 \operatorname {RootOf}\left (\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}+\textit {\_Z}^{2}+16\right ) \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{4} x -3 \operatorname {RootOf}\left (\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}+\textit {\_Z}^{2}+16\right ) \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{4}-128 \operatorname {RootOf}\left (\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}+\textit {\_Z}^{2}+16\right ) \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2} x -112 \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2} \operatorname {RootOf}\left (\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}+\textit {\_Z}^{2}+16\right )+384 \sqrt {x^{2}+x}\, \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}-768 \operatorname {RootOf}\left (\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}+\textit {\_Z}^{2}+16\right ) x -512 \operatorname {RootOf}\left (\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}+\textit {\_Z}^{2}+16\right )+7168 \sqrt {x^{2}+x}}{x \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}-\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}+16 x}\right )}{4}+\frac {\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right ) \ln \left (\frac {3 x \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{5}-3 \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{5}+224 x \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{3}+16 \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{3}+384 \sqrt {x^{2}+x}\, \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}+2048 x \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )+512 \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )-1024 \sqrt {x^{2}+x}}{x \operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}-\operatorname {RootOf}\left (\textit {\_Z}^{4}+16 \textit {\_Z}^{2}+128\right )^{2}-16}\right )}{4}\) \(475\)
risch \(\frac {\left (5+2 x \right ) \left (1+x \right ) x}{4 \sqrt {\left (1+x \right ) x}}-\frac {5 \ln \left (x +\frac {1}{2}+\sqrt {x^{2}+x}\right )}{8}+\frac {\sqrt {\frac {4 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\frac {3 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+4+3 \sqrt {2}}\, \sqrt {2}\, \left (\sqrt {-2+2 \sqrt {2}}\, \arctan \left (\frac {\sqrt {-2+2 \sqrt {2}}\, \sqrt {\left (3 \sqrt {2}-4\right ) \left (-\frac {\left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+12 \sqrt {2}+17\right )}\, \left (\frac {24 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+\frac {17 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\sqrt {2}\right ) \left (-\sqrt {2}-1+x \right ) \left (3 \sqrt {2}-4\right )}{2 \left (-\sqrt {2}+1-x \right ) \left (\frac {\left (-\sqrt {2}-1+x \right )^{4}}{\left (-\sqrt {2}+1-x \right )^{4}}-\frac {34 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+1\right )}\right ) \sqrt {1+\sqrt {2}}\, \sqrt {2}-2 \sqrt {-2+2 \sqrt {2}}\, \arctan \left (\frac {\sqrt {-2+2 \sqrt {2}}\, \sqrt {\left (3 \sqrt {2}-4\right ) \left (-\frac {\left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+12 \sqrt {2}+17\right )}\, \left (\frac {24 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+\frac {17 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\sqrt {2}\right ) \left (-\sqrt {2}-1+x \right ) \left (3 \sqrt {2}-4\right )}{2 \left (-\sqrt {2}+1-x \right ) \left (\frac {\left (-\sqrt {2}-1+x \right )^{4}}{\left (-\sqrt {2}+1-x \right )^{4}}-\frac {34 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+1\right )}\right ) \sqrt {1+\sqrt {2}}-4 \,\operatorname {arctanh}\left (\frac {\sqrt {\frac {4 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\frac {3 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+4+3 \sqrt {2}}}{2 \sqrt {1+\sqrt {2}}}\right ) \sqrt {2}+6 \,\operatorname {arctanh}\left (\frac {\sqrt {\frac {4 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\frac {3 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+4+3 \sqrt {2}}}{2 \sqrt {1+\sqrt {2}}}\right )\right )}{2 \sqrt {-\frac {\frac {3 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\frac {4 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-3 \sqrt {2}-4}{\left (1+\frac {-\sqrt {2}-1+x}{-\sqrt {2}+1-x}\right )^{2}}}\, \left (1+\frac {-\sqrt {2}-1+x}{-\sqrt {2}+1-x}\right ) \left (3 \sqrt {2}-4\right ) \sqrt {1+\sqrt {2}}}\) \(788\)
default \(-\frac {5 \ln \left (x +\frac {1}{2}+\sqrt {x^{2}+x}\right )}{8}+\frac {x \sqrt {x^{2}+x}}{2}+\frac {5 \sqrt {x^{2}+x}}{4}+\frac {\sqrt {\frac {4 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\frac {3 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+4+3 \sqrt {2}}\, \sqrt {2}\, \left (\sqrt {-2+2 \sqrt {2}}\, \arctan \left (\frac {\sqrt {-2+2 \sqrt {2}}\, \sqrt {\left (3 \sqrt {2}-4\right ) \left (-\frac {\left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+12 \sqrt {2}+17\right )}\, \left (\frac {24 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+\frac {17 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\sqrt {2}\right ) \left (-\sqrt {2}-1+x \right ) \left (3 \sqrt {2}-4\right )}{2 \left (-\sqrt {2}+1-x \right ) \left (\frac {\left (-\sqrt {2}-1+x \right )^{4}}{\left (-\sqrt {2}+1-x \right )^{4}}-\frac {34 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+1\right )}\right ) \sqrt {1+\sqrt {2}}\, \sqrt {2}-2 \sqrt {-2+2 \sqrt {2}}\, \arctan \left (\frac {\sqrt {-2+2 \sqrt {2}}\, \sqrt {\left (3 \sqrt {2}-4\right ) \left (-\frac {\left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+12 \sqrt {2}+17\right )}\, \left (\frac {24 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+\frac {17 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\sqrt {2}\right ) \left (-\sqrt {2}-1+x \right ) \left (3 \sqrt {2}-4\right )}{2 \left (-\sqrt {2}+1-x \right ) \left (\frac {\left (-\sqrt {2}-1+x \right )^{4}}{\left (-\sqrt {2}+1-x \right )^{4}}-\frac {34 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+1\right )}\right ) \sqrt {1+\sqrt {2}}-4 \,\operatorname {arctanh}\left (\frac {\sqrt {\frac {4 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\frac {3 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+4+3 \sqrt {2}}}{2 \sqrt {1+\sqrt {2}}}\right ) \sqrt {2}+6 \,\operatorname {arctanh}\left (\frac {\sqrt {\frac {4 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\frac {3 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}+4+3 \sqrt {2}}}{2 \sqrt {1+\sqrt {2}}}\right )\right )}{2 \sqrt {-\frac {\frac {3 \sqrt {2}\, \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-\frac {4 \left (-\sqrt {2}-1+x \right )^{2}}{\left (-\sqrt {2}+1-x \right )^{2}}-3 \sqrt {2}-4}{\left (1+\frac {-\sqrt {2}-1+x}{-\sqrt {2}+1-x}\right )^{2}}}\, \left (1+\frac {-\sqrt {2}-1+x}{-\sqrt {2}+1-x}\right ) \left (3 \sqrt {2}-4\right ) \sqrt {1+\sqrt {2}}}\) \(789\)

input
int((x^2+x)^(3/2)/(x^2+1),x,method=_RETURNVERBOSE)
 
output
-1/(-2+2*2^(1/2))^(1/2)*((-1/2*2^(1/2)+1)*ln((2^(1/2)*x-((1+x)*x)^(1/2)*(2 
+2*2^(1/2))^(1/2)+x+1)/x)+(1/2*2^(1/2)-1)*ln((2^(1/2)*x+((1+x)*x)^(1/2)*(2 
+2*2^(1/2))^(1/2)+x+1)/x)-5/8*(-2+2*2^(1/2))^(1/2)*ln((((1+x)*x)^(1/2)-x)/ 
x)+5/8*(-2+2*2^(1/2))^(1/2)*ln((x+((1+x)*x)^(1/2))/x)-1/2*(-2+2*2^(1/2))^( 
1/2)*(x+5/2)*((1+x)*x)^(1/2)+2^(1/2)*(arctan(((2+2*2^(1/2))^(1/2)*x-2*((1+ 
x)*x)^(1/2))/x/(-2+2*2^(1/2))^(1/2))-arctan(((2+2*2^(1/2))^(1/2)*x+2*((1+x 
)*x)^(1/2))/x/(-2+2*2^(1/2))^(1/2))))*x^2/(x+((1+x)*x)^(1/2))^2/(-((1+x)*x 
)^(1/2)+x)^2
 
3.1.93.5 Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.33 (sec) , antiderivative size = 132, normalized size of antiderivative = 1.02 \[ \int \frac {\left (x+x^2\right )^{3/2}}{1+x^2} \, dx=\frac {1}{4} \, \sqrt {x^{2} + x} {\left (2 \, x + 5\right )} - \frac {1}{2} \, \sqrt {2 i - 2} \log \left (-2 \, x + \left (i + 1\right ) \, \sqrt {2 i - 2} + 2 \, \sqrt {x^{2} + x} - 2 i\right ) + \frac {1}{2} \, \sqrt {2 i - 2} \log \left (-2 \, x - \left (i + 1\right ) \, \sqrt {2 i - 2} + 2 \, \sqrt {x^{2} + x} - 2 i\right ) - \frac {1}{2} \, \sqrt {-2 i - 2} \log \left (-2 \, x - \left (i - 1\right ) \, \sqrt {-2 i - 2} + 2 \, \sqrt {x^{2} + x} + 2 i\right ) + \frac {1}{2} \, \sqrt {-2 i - 2} \log \left (-2 \, x + \left (i - 1\right ) \, \sqrt {-2 i - 2} + 2 \, \sqrt {x^{2} + x} + 2 i\right ) + \frac {5}{8} \, \log \left (-2 \, x + 2 \, \sqrt {x^{2} + x} - 1\right ) \]

input
integrate((x^2+x)^(3/2)/(x^2+1),x, algorithm="fricas")
 
output
1/4*sqrt(x^2 + x)*(2*x + 5) - 1/2*sqrt(2*I - 2)*log(-2*x + (I + 1)*sqrt(2* 
I - 2) + 2*sqrt(x^2 + x) - 2*I) + 1/2*sqrt(2*I - 2)*log(-2*x - (I + 1)*sqr 
t(2*I - 2) + 2*sqrt(x^2 + x) - 2*I) - 1/2*sqrt(-2*I - 2)*log(-2*x - (I - 1 
)*sqrt(-2*I - 2) + 2*sqrt(x^2 + x) + 2*I) + 1/2*sqrt(-2*I - 2)*log(-2*x + 
(I - 1)*sqrt(-2*I - 2) + 2*sqrt(x^2 + x) + 2*I) + 5/8*log(-2*x + 2*sqrt(x^ 
2 + x) - 1)
 
3.1.93.6 Sympy [F]

\[ \int \frac {\left (x+x^2\right )^{3/2}}{1+x^2} \, dx=\int \frac {\left (x \left (x + 1\right )\right )^{\frac {3}{2}}}{x^{2} + 1}\, dx \]

input
integrate((x**2+x)**(3/2)/(x**2+1),x)
 
output
Integral((x*(x + 1))**(3/2)/(x**2 + 1), x)
 
3.1.93.7 Maxima [F]

\[ \int \frac {\left (x+x^2\right )^{3/2}}{1+x^2} \, dx=\int { \frac {{\left (x^{2} + x\right )}^{\frac {3}{2}}}{x^{2} + 1} \,d x } \]

input
integrate((x^2+x)^(3/2)/(x^2+1),x, algorithm="maxima")
 
output
integrate((x^2 + x)^(3/2)/(x^2 + 1), x)
 
3.1.93.8 Giac [F(-2)]

Exception generated. \[ \int \frac {\left (x+x^2\right )^{3/2}}{1+x^2} \, dx=\text {Exception raised: TypeError} \]

input
integrate((x^2+x)^(3/2)/(x^2+1),x, algorithm="giac")
 
output
Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Unable to divide, perhaps due to ro 
unding error%%%{%%{poly1[2937825863393165301979971848533484854911359614337 
236965430
 
3.1.93.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\left (x+x^2\right )^{3/2}}{1+x^2} \, dx=\int \frac {{\left (x^2+x\right )}^{3/2}}{x^2+1} \,d x \]

input
int((x + x^2)^(3/2)/(x^2 + 1),x)
 
output
int((x + x^2)^(3/2)/(x^2 + 1), x)